//
//  CETestCase.h
//  CELog_Example
//
//  Created by maoerduo on 2021/2/26.
//  Copyright © 2021 maoerduo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CETestStrategy.h"

NS_ASSUME_NONNULL_BEGIN

//请求AB测试需要的参数
@protocol CETestCaseRequestParameter <NSObject>

//设备的UUID
@property (nonatomic, copy) NSString * deviceUUID;

//安装APP的渠道
@property (nonatomic, copy) NSString * channel;

//设备类型
@property (nonatomic, copy) NSString * systemModel;

//系统的版本
@property (nonatomic, copy) NSString * systemVersion;

//设备当前的区域，
@property (nonatomic, copy) NSString * region;

//设备名称
@property (nonatomic, copy) NSString * deviceName;

//app的版本号
@property (nonatomic, copy) NSString * appVersion;

//第一次打开的时间戳
@property (nonatomic, assign) NSTimeInterval firstOpenTimestamp;

@end




@protocol CETestCase <NSObject>

//实验的ID
@property(nonatomic, copy) NSString * identifier;

//实验所需额外的参数
@property(nonatomic, strong) NSDictionary<NSString *, id> * extra;

//从服务器获取到的策略
@property(nonatomic, readonly) id<CETestStrategy> strategy;

//默认的策略
@property(nonatomic, readonly) id<CETestStrategy> defaultStrategy;

//当前的策略，如果服务器策略获取失败了，那么返回默认的策略。
@property(nonatomic, readonly) id<CETestStrategy> currentStrategy;

//从服务器返回的配置字典，需要子类通过这个字典初始化策略
- (void)updateConifg:(NSDictionary *)configInfo;

@end

NS_ASSUME_NONNULL_END
